#ifndef _UART_H_
#define _UART_H_

#include "Global.h"


// #define 	_UART_EN_


#define		P_UART_TX	_pb2	//
#define		M_UART_TX	_pbc2

#define BAUD_RATE_115200 //BAUD_RATE_19200

#ifdef BAUD_RATE_115200
	#define	C_DELAY_HEAD		9
	#define C_DELAY_DATA1		3//2
	#define C_DELAY_DATA0		6//5
	#define C_DELAY_LAST_BIT_DATA1	8
	#define C_DELAY_LAST_BIT_DATA0	16
	#define C_DELAY_TAIL		24//16
#endif

#ifdef BAUD_RATE_19200
	#define	C_DELAY_HEAD		95
	#define C_DELAY_DATA1		88
	#define C_DELAY_DATA0		92
	#define C_DELAY_TAIL		95
#endif


void    initUART(void);
void	UART_SendByte(uint8_t txdata);
void	UART_Printf(char* str);
void	UART_PrintfPara(char* str, uint8_t para);
void	UART_PrintfPara16(char* str, uint16_t para);


#endif
